package com.bw.kf.all2211a.room

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy.REPLACE
import androidx.room.Query
import androidx.room.Update
import com.bw.kf.mvvm.entity.LoginData
import com.bw.kf.mvvm.entity.LoginEntity

@Dao
interface UserDao {
      @Insert(onConflict =REPLACE)
      fun insertUser(loginEntity: LoginData)
      @Update
      fun updateUser(loginEntity: LoginData)
      @Delete
      fun deleteUser(loginEntity: LoginData)
      @Query("select * from user where phone=:phone")
      fun queryUser(phone:String):List<LoginData>
}
